package org.jeecg.modules.classroom.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.classroom.entity.FacClassroom;
import org.jeecg.modules.classroom.mapper.FacClassroomMapper;
import org.jeecg.modules.classroom.service.IFacClassroomService;
import org.jeecg.modules.classroom.vo.FacClassroomVo;
import org.jeecg.modules.relation.relbuildingclassroom.mapper.RelBuildingClassroomMapper;
import org.jeecg.modules.relation.relbuildingclassroom.vo.RelBuildingClassroomVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @Description: fac_classroom
 * @author: baochangrong
 * @Date: 2022-02-10
 * @Version: V1.0
 */
@Service
public class FacClassroomServiceImpl extends ServiceImpl<FacClassroomMapper, FacClassroom> implements IFacClassroomService {



    @Autowired
    FacClassroomMapper facClassroomMapper;

    /**
     * 附带建筑名称查询 （分页）
     * voListAll
     */
    @Override
    public IPage<FacClassroomVo> voListAll(Page<FacClassroomVo> page, FacClassroomVo facClassroomVo) {
        //获取该租户下所有建筑id
        List<FacClassroomVo> facClassroomVoList = facClassroomMapper.voListAll(page, facClassroomVo);

        return page.setRecords(facClassroomVoList);
    }

}
